Using Geometric Operations
This section shows you how to apply geometric operations to shapes. In particular, this section shows you how to
Many of the sample functions in this section create geometric shapes, and to do so, they specify geometric points for the shapes' geometries. Since a geometric point contains two fixed-point values, the sample functions in this section must convert integer constants to fixed-point constants when specifying a geometric point. QuickDraw GX provides the
- determine and reverse the contour direction of a shape's contours
- break a contour into multiple contours
- reduce and simplify the geometric description of a shape
- incorporate style information into a shape's geometry
- obtain geometric information about a shape's geometry, such as contour length and area
- determine and alter the bounding rectangle of a shape
- inset a shape's geometry
- determine if two shapes touch
- determine if one shape contains another
- perform geometric arithmetic, such as intersection and union, on shapes
GXIntToFixed
macro, which performs this conversion by shifting the integer value 16 bits to the left:
#define GXIntToFixed(a) ((Fixed) (a) << 16)QuickDraw GX also provides theff
macro as a convenient alias:
#define ff(a) GXIntToFixed(a)Theff
macro is used throughout this section.
Subtopics
- Determining and Reversing Contour Direction
- Breaking Shape Contours
- Eliminating Unnecessary Geometric Points
- Simplifying Shapes
- Converting a Shape to Primitive Form
- Finding Geometric Information About a Shape
- Setting a Shape's Bounding Rectangle
- Insetting Shapes
- Determining Whether Two Shapes Touch
- Determining Whether One Shape Contains Another
- Performing Geometric Arithmetic With Shapes
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help